sort an array by characters length in js

125

sort an array by characters length in js -

arr.sort((a, b) => a.length - b.length)

Comments

Submit
0 Comments